Skip to contentSkip to conversation

use-after-free in amdgpu_vm_update_directories

Bug 111682 [email protected] 1 participant 6 messages Sep 13, 2019 – Nov 19, 2019

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=111682

Bug ID: 111682
Summary: use-after-free in amdgpu_vm_update_directories
Product: DRI
Version: XOrg git
Hardware: Other
OS: All
Status: NEW
Severity: not set
Priority: not set
Component: DRM/AMDgpu
Assignee: [email protected]
Reporter: [email protected]

Created attachment 145345
--> https://bugs.freedesktop.org/attachment.cgi?id=145345&action=edit
dmesg output

When using amdgpu.vm_update_mode=3 the following error appears after some time (ranging from a few minutes to a few hours):

BUG: KASAN: use-after-free in amdgpu_vm_update_directories

I attached the relevant dmesg part.

Notes:
- happens on Navi10 and gfx9 (probably also on other cards but I didn't try)
- reproduced on 865b4ca43816e113996c3be571d4998b6daf5f1 and 20d6b9c3b7f40ec427af912d140f2be0de098d2d

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=111682

--- Comment #1 from Andrey Grodzovsky <[email protected]> --- Which kernel branch are you using ? I couldn't find amdgpu_vm_update_directories in latest code in amd-staging-drm-next and turns out it was renamed to amdgpu_vm_update_pdes in 78b20c2ee6788ba0df8b36b1369bc7e264262d3b back in March so seems like this is very outdated code.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111682

--- Comment #2 from Pierre-Eric Pelloux-Prayer <[email protected]> --- (In reply to Andrey Grodzovsky from comment #1)

Quoted 5 lines

Which kernel branch are you using ? I couldn't find amdgpu_vm_update_directories in latest code in amd-staging-drm-next and turns out it was renamed to amdgpu_vm_update_pdes in 78b20c2ee6788ba0df8b36b1369bc7e264262d3b back in March so seems like this is very outdated code.

I'm using amd-staging-drm-next from a few days ago.

But 78b20c2ee6788ba0df8b36b1369bc7e264262d3b (drm/amdgpu: allow direct submission of PDE updates v2) has been pushed in this branch recently and indeed it renamed the function.

I'll rebuild a kernel and test if the issue is still there.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111682

--- Comment #3 from Pierre-Eric Pelloux-Prayer <[email protected]> --- Created attachment 145387
--> https://bugs.freedesktop.org/attachment.cgi?id=145387&action=edit
dmesg when using cfdabd064b2d(drm/amdgpu: remove the redundant null checks)

Using the latest commit from amd-staging-drm-next (= cfdabd064b2d58f "drm/amdgpu: remove the redundant null checks"): the use-after-free bug is still there.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

[Bug 111682] use-after-free in amdgpu_vm_update_pdes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111682

Pierre-Eric Pelloux-Prayer <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

            Summary|use-after-free in           |use-after-free in
                   |amdgpu_vm_update_directorie |amdgpu_vm_update_pdes
                   |s                           |
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw

[Bug 111682] use-after-free in amdgpu_vm_update_pdes

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111682

Martin Peres <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |MOVED

--- Comment #4 from Martin Peres <[email protected]> --- -- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/905.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel